package com.ysqcould.message.service.impl;


import com.ysqcould.common.utils.DateUtils;
import com.ysqcould.message.domain.DatumChange;
import com.ysqcould.message.mapper.DatumChangeMapper;
import com.ysqcould.message.service.IDatumChangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 协会意见反馈和资料变更Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-06-30
 */
@Service
public class DatumChangeServiceImpl implements IDatumChangeService
{
    @Autowired
    private DatumChangeMapper datumChangeMapper;

    /**
     * 查询协会意见反馈和资料变更
     * 
     * @param id 协会意见反馈和资料变更主键
     * @return 协会意见反馈和资料变更
     */
    @Override
    public DatumChange selectDatumChangeById(Long id)
    {
        return datumChangeMapper.selectDatumChangeById(id);
    }

    /**
     * 查询协会意见反馈和资料变更列表
     * 
     * @param datumChange 协会意见反馈和资料变更
     * @return 协会意见反馈和资料变更
     */
    @Override
    public List<DatumChange> selectDatumChangeList(DatumChange datumChange)
    {
        return datumChangeMapper.selectDatumChangeList(datumChange);
    }

    /**
     * 新增协会意见反馈和资料变更
     * 
     * @param datumChange 协会意见反馈和资料变更
     * @return 结果
     */
    @Override
    public int insertDatumChange(DatumChange datumChange)
    {
        datumChange.setCreateTime(DateUtils.getNowDate());
        return datumChangeMapper.insertDatumChange(datumChange);
    }

    /**
     * 修改协会意见反馈和资料变更
     * 
     * @param datumChange 协会意见反馈和资料变更
     * @return 结果
     */
    @Override
    public int updateDatumChange(DatumChange datumChange)
    {
        datumChange.setUpdateTime(DateUtils.getNowDate());
        return datumChangeMapper.updateDatumChange(datumChange);
    }

    /**
     * 批量删除协会意见反馈和资料变更
     * 
     * @param ids 需要删除的协会意见反馈和资料变更主键
     * @return 结果
     */
    @Override
    public int deleteDatumChangeByIds(Long[] ids)
    {
        return datumChangeMapper.deleteDatumChangeByIds(ids);
    }

    /**
     * 删除协会意见反馈和资料变更信息
     * 
     * @param id 协会意见反馈和资料变更主键
     * @return 结果
     */
    @Override
    public int deleteDatumChangeById(Long id)
    {
        return datumChangeMapper.deleteDatumChangeById(id);
    }
}
